cmake_minimum_required(VERSION 3.14)
project(protobuf)
find_package(Protobuf REQUIRED)
# 添加包含路径
add_subdirectory(proto)
# 添加生成的头文件搜索路径为build后的路径
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_executable(main main.cc)
target_link_libraries(main proto ${PROTOBUF_LIBRARY})
